package com.onewo.arthasdemo.controller;

import com.onewo.arthasdemo.service.EchoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class EchoController {

    @Resource
    private EchoService echoService;

    @GetMapping("/echo")
    public String echo(@RequestParam("req") String req) throws InterruptedException {
        return echoService.echo(req);
    }

    @GetMapping("/increase")
    public void increase(){
        echoService.increase();
    }
}
